<!DOCTYPE html>
<script src="../include.js"></script>
<body>
    <!-- Other browsers seem to display the message below regardless of what src is (valid or not) -->
    <iframe id="target" srcdoc="iframe content"></iframe>
    <script>
        asyncTest((done) => {
            const script = target.contentDocument.createElement("script");
            script.innerHTML = `parent.postMessage("message from test iframe", "*");`;
            target.contentDocument.body.appendChild(script);
            window.addEventListener("message", event => {
                println(event.data);
                done();
            });
        });
    </script>
</body>
